feat(enrichment): unsafe-any (TS) counter analyzer#3491
Conversation
Flags newly-added `: any`, `as any`, and `<any>` in TypeScript diffs as a type-safety erosion signal. Syncs the REES analyzer name registry with the enrichment registry for merged hardcodedUrl/debugLeftover plus unsafeAny. Co-authored-by: Cursor <cursoragent@cursor.com>
Address Orb nits: ignore inline /* */ comments before matching and pin .mts/.cts extension coverage in tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Only skip full-line comments instead of any line starting with /*, and
tighten : any matching so object-literal values like { value: any }
are not reported as type annotations.
Co-authored-by: Cursor <cursoragent@cursor.com>
Track block-comment state across added patch lines and tighten object- literal guards so commented or shorthand values are not reported. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-05 10:18:12 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3491 +/- ##
=======================================
Coverage 93.03% 93.03%
=======================================
Files 299 299
Lines 31204 31204
Branches 11386 11386
=======================================
Hits 29031 29031
Misses 1517 1517
Partials 656 656
🚀 New features to boost your workflow:
|
|
Gittensory is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: review-enrichment/src/analyzers/unsafe-any.ts:16: `ANNOTATION_RE` does not match reachable annotations followed by commas, so `function f(v: any, next: string) {}` and `let a: any, b: string;` are silently missed; change the object-literal guard to avoid only value-position object literals or add a follow-up parse/context check instead of excluding all comma/braces after `any`.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
Fixes #2017
UnsafeAnyFindingand a localunsafeAnyanalyzer that flags newly-added: anyannotations,as anycasts, and<any>assertions in non-test TypeScript source/* */block comments across added patch lines; guard object-literal shorthand values; cap at 25 findingssrc/review/enrichment-analyzer-names.tswith the enrichment registry (hardcodedUrl,debugLeftover,unsafeAny)review-enrichment/test/unsafe-any.test.tscovering annotation/cast/assertion, leading and multi-line block comments, object-literal guards, non-TS/test skip,.mts/.cts, cap, and brief renderingTest plan
cd review-enrichment && npm run build && npm run metadata && node --test test/unsafe-any.test.ts test/analyzer-registry.test.tsvalidate-codeMade with Cursor